home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / sysinfo / TECH4.FRM < prev    next >
Text File  |  1999-01-25  |  20KB  |  441 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "MSysInfo Sample Tech Support Form"
  5.    ClientHeight    =   4875
  6.    ClientLeft      =   1260
  7.    ClientTop       =   1620
  8.    ClientWidth     =   9360
  9.    Height          =   5280
  10.    Icon            =   "tech4.frx":0000
  11.    Left            =   1200
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4875
  17.    ScaleWidth      =   9360
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   1275
  20.    Width           =   9480
  21.    Begin VB.CommandButton cmdPrint 
  22.       Caption         =   "&Print"
  23.       Height          =   375
  24.       Left            =   7800
  25.       TabIndex        =   4
  26.       Top             =   4080
  27.       Width           =   1455
  28.    End
  29.    Begin VB.CommandButton cmdClose 
  30.       Caption         =   "&Close"
  31.       Height          =   375
  32.       Left            =   7800
  33.       TabIndex        =   0
  34.       Top             =   3600
  35.       Width           =   1455
  36.    End
  37.    Begin TabDlg.SSTab SSTab1 
  38.       Height          =   3375
  39.       Left            =   120
  40.       TabIndex        =   1
  41.       Top             =   120
  42.       Width           =   9135
  43.       _ExtentX        =   16113
  44.       _ExtentY        =   5953
  45.       _Version        =   393216
  46.       Style           =   1
  47.       Tabs            =   4
  48.       TabsPerRow      =   4
  49.       TabHeight       =   520
  50.       TabCaption(0)   =   "&Environment"
  51.       TabPicture(0)   =   "tech4.frx":030A
  52.       Tab(0).ControlEnabled=   -1  'True
  53.       Tab(0).Control(0)=   "Text1(0)"
  54.       Tab(0).Control(0).Enabled=   0   'False
  55.       Tab(0).ControlCount=   1
  56.       TabCaption(1)   =   "&Memory"
  57.       TabPicture(1)   =   "tech4.frx":0326
  58.       Tab(1).ControlEnabled=   0   'False
  59.       Tab(1).Control(0)=   "Text1(1)"
  60.       Tab(1).ControlCount=   1
  61.       TabCaption(2)   =   "&Drives"
  62.       TabPicture(2)   =   "tech4.frx":0342
  63.       Tab(2).ControlEnabled=   0   'False
  64.       Tab(2).Control(0)=   "Drive1"
  65.       Tab(2).Control(1)=   "Text1(2)"
  66.       Tab(2).ControlCount=   2
  67.       TabCaption(3)   =   "&Files"
  68.       TabPicture(3)   =   "tech4.frx":035E
  69.       Tab(3).ControlEnabled=   0   'False
  70.       Tab(3).Control(0)=   "Text1(3)"
  71.       Tab(3).ControlCount=   1
  72.       Begin VB.TextBox Text1 
  73.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  74.             Name            =   "Courier"
  75.             Size            =   9.75
  76.             Charset         =   0
  77.             Weight          =   400
  78.             Underline       =   0   'False
  79.             Italic          =   0   'False
  80.             Strikethrough   =   0   'False
  81.          EndProperty
  82.          Height          =   2775
  83.          Index           =   3
  84.          Left            =   -74880
  85.          Locked          =   -1  'True
  86.          MultiLine       =   -1  'True
  87.          ScrollBars      =   3  'Both
  88.          TabIndex        =   8
  89.          Top             =   480
  90.          Width           =   8895
  91.       End
  92.       Begin VB.TextBox Text1 
  93.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  94.             Name            =   "Courier"
  95.             Size            =   9.75
  96.             Charset         =   0
  97.             Weight          =   400
  98.             Underline       =   0   'False
  99.             Italic          =   0   'False
  100.             Strikethrough   =   0   'False
  101.          EndProperty
  102.          Height          =   2775
  103.          Index           =   0
  104.          Left            =   120
  105.          Locked          =   -1  'True
  106.          MultiLine       =   -1  'True
  107.          ScrollBars      =   3  'Both
  108.          TabIndex        =   7
  109.          Top             =   480
  110.          Width           =   8895
  111.       End
  112.       Begin VB.TextBox Text1 
  113.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  114.             Name            =   "Courier"
  115.             Size            =   9.75
  116.             Charset         =   0
  117.             Weight          =   400
  118.             Underline       =   0   'False
  119.             Italic          =   0   'False
  120.             Strikethrough   =   0   'False
  121.          EndProperty
  122.          Height          =   2775
  123.          Index           =   1
  124.          Left            =   -74880
  125.          Locked          =   -1  'True
  126.          MultiLine       =   -1  'True
  127.          ScrollBars      =   3  'Both
  128.          TabIndex        =   6
  129.          Top             =   480
  130.          Width           =   8895
  131.       End
  132.       Begin VB.TextBox Text1 
  133.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  134.             Name            =   "Courier"
  135.             Size            =   9.75
  136.             Charset         =   0
  137.             Weight          =   400
  138.             Underline       =   0   'False
  139.             Italic          =   0   'False
  140.             Strikethrough   =   0   'False
  141.          EndProperty
  142.          Height          =   2775
  143.          Index           =   2
  144.          Left            =   -74880
  145.          Locked          =   -1  'True
  146.          MultiLine       =   -1  'True
  147.          ScrollBars      =   3  'Both
  148.          TabIndex        =   3
  149.          Top             =   480
  150.          Width           =   8895
  151.       End
  152.       Begin VB.DriveListBox Drive1 
  153.          Height          =   315
  154.          Left            =   -68880
  155.          TabIndex        =   2
  156.          Top             =   360
  157.          Visible         =   0   'False
  158.          Width           =   1575
  159.       End
  160.    End
  161.    Begin VB.Label Label9 
  162.       Caption         =   "Label9"
  163.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  164.          Name            =   "MS Sans Serif"
  165.          Size            =   9.75
  166.          Charset         =   0
  167.          Weight          =   400
  168.          Underline       =   0   'False
  169.          Italic          =   0   'False
  170.          Strikethrough   =   0   'False
  171.       EndProperty
  172.       Height          =   975
  173.       Left            =   240
  174.       TabIndex        =   5
  175.       Top             =   3720
  176.       Width           =   7335
  177.    End
  178.    Begin SystemInfoControl.MSysInfo MSysInfo1 
  179.       Left            =   7800
  180.       Top             =   4320
  181.       _ExtentX        =   847
  182.       _ExtentY        =   847
  183.    End
  184. End
  185. Attribute VB_Name = "Form1"
  186. Attribute VB_Creatable = False
  187. Attribute VB_Exposed = False
  188. Private Type m_DriveInfo
  189.     Name As String
  190.     Total As String
  191.     Available As String
  192.     Type As String
  193. End Type
  194.  
  195. Private Sub cmdClose_Click()
  196.     Unload Me
  197. End Sub
  198.  
  199.  
  200. Private Sub cmdPrint_Click()
  201.     MousePointer = 11
  202.     Printer.ScaleMode = vbTwips
  203.     Printer.CurrentY = 1440
  204.     Printer.Print "ENVIRONMENT:"
  205.     Printer.Print Text1(0).Text & vbCrLf
  206.     Printer.Print "MEMORY:"
  207.     Printer.Print Text1(1).Text & vbCrLf
  208.     Printer.Print "DRIVES:"
  209.     Printer.Print Text1(2).Text & vbCrLf
  210.     Printer.Print "FILES:"
  211.     Printer.Print Text1(3).Text
  212.     Printer.EndDoc
  213.     MousePointer = 0
  214. End Sub
  215.  
  216. Private Sub Form_Load()
  217.     Dim lpTemp As String
  218.     Dim l As Long 'temp variable for our loops
  219.     Dim strHeader As String 'temp string to create a header for our results
  220.     Dim aStr() As m_DriveInfo 'our custom array
  221.     Dim mystr As String 'temp string
  222.     Dim iTotalLen As Integer    'holds the longest value so we can format the results properly
  223.     Dim iAvailableLen As Integer 'holds the longest value so we can format the results properly
  224.     mystr = "This sample project demonstrates how one might use the Mabry SysInfo control " & _
  225.     "to create a custom Form for providing information about the system on which an " & _
  226.     "application is running. A printout of such information could be used by technical support " & _
  227.     "staff in troubleshooting customer problems."
  228.     Label9.Caption = mystr
  229.     lpTemp = Me.Caption
  230.     
  231.     Me.Show
  232.     cmdPrint.Enabled = False
  233.     DoEvents
  234.     MousePointer = 11
  235.     
  236.     'ENVIRONMENT
  237.     Me.Caption = "Getting environment info..."
  238.     Text1(0).Text = Format$("Computer Name: ", "@@@@@@@@@@@@@@@@@@@@@@") & Trim